package com.compass.framework.model

import java.io.Serializable

/**
 * Description： 医护订单
 * Date:2024/1/15 9:21
 */
data class MedicalCareOrderWarp(
    val total: Int,
    val list: MutableList<MedicalCareOrder>? = mutableListOf(),
)

/**
 * 问诊订单bean
 */

data class MedicalCareOrder(
    val id: String,
    val type: String?,
    val status: String,
    val doctorName: String,
    val etd: String?,
    val payPrice: Long,
    val appointmentTime: Long,
    val patientBirthday: Long,
    val successTime: Long,
    val distance: String,
    val nurseName: String,
    val address: Address?,
    val patientName: String,
    val patientAvatar: String,
    val patientSex: Int,
    val patientAge: String,
    val patientAccId: String,
    val locationUrl: String,
    val projectGrade: Float?,
    val commentStatus: Int,
    val endTime: Long,
    //详情的参数
    val hospitalizedStatus: String,//1-住院 0-没住院
    val diseaseDescriptionText: String,
    val log: MutableList<Log>?,//护理进度
    val nurseLog: NurseLog?,//操作日志
    val extraPrice: Long,//额外价格（分）
    val extraMedicalConsumable: MutableList<String> = mutableListOf(),//额外耗材 "纱布","纸巾", "口罩"
    val nurseProjectCommentRespVO: NurseProjectComment?,//项目评价
    val nursePersonCommentRespVO: NursePersonComment?,//人员评价
):Serializable{
    fun getSexString(): String {
        return  when (patientSex) {
            1 -> {
                "男"
            }
            2 -> {
                "女"
            }
            else -> {
                "未知"
            }
        }
    }
}

data class Address(
    val lon: String,
    val lat: String,
    val address: String,
    val provinceCode: String,
    val cityCode: String,
    val countyCode: String,
    val person: String,
    val mobile: String,
):Serializable{
    fun getLon(): Double {
        if (lon.isNotEmpty()){
            return lon.toDouble()
        }
        return 0.0
    }

    fun getLat(): Double {
        if (lat.isNotEmpty()){
            return lat.toDouble()
        }
        return 0.0
    }

}

data class Log(
    val stepType: String,
    val stepText: String, //进度文本
    val describe: String?,//进度描述
    val createTime: Long, //创建时间
):Serializable

data class NurseLog (
    val id: String,
    val orderId: String, //进度文本
    val temperature: String,//体温
    val breathing: String, //呼吸次数
    val heartRate: String, //心率
    val sbp: String, //收缩压
    val dbp: String, //舒张压
    val log: String, //日志内容
    val img: MutableList<String> = mutableListOf(),  //图片数组
):Serializable


data class NurseProjectComment (
    val projectGrade: Float, //满意度
    val projectEval: String, //评价内容

):Serializable

data class NursePersonComment (

    val nurseGrade: Float,//护理内容满意度
    val personMannerGrade: Float, //人员态度满意度
    val personSpeed: Float,//人员上门速度满意度"
    val personEval: String, //评价内容
):Serializable